Switching mode power supplies are normally used to provide desired DC power to electronic devices, like LED (light-emitting diode) strings and so on.
The switching mode power supply usually comprises an energy storage component, e.g. an inductor or a transformer, and a power switch coupled to the energy storage component. There are two primary types of control methods used in the switching regulator. One is fixed frequency control and the other one is variable frequency control. An example of variable frequency control is Quasi-Resonant (QR) control. FIG. 1 shows the waveforms of signals in a Quasi-Resonant Controlled switching mode power supply comprising a power switch and a transformer. In FIG. 1, VDC represents a voltage across the power switch, SW represents a control signal of the power switch, and Is represents a current flowing through the transformer. In the example of FIG. 1, the switching mode power supply works under boundary current mode (BCM). As can be seen from FIG. 1, the transformer and the parasitic capacitor of the power switch resonate after the current Is flowing through the transformer decreases to zero. The power switch is turned on when the voltage VDC across the power switch decreases to zero during resonance, so as to reduce the power loss. Thus, zero cross detecting (ZCD) is needed. The power switch is turned off to regulate the output voltage/output current/output power when the current Is flowing through the transformer reaches a reference signal relating to the output voltage/output current/output power.
Normally, the control circuit of the switching mode power supply is integrated in a chip. The control circuit receives a current sense signal indicative of the current flowing through the power switch via a pin coupled to an off-chip current sense resistor, and receives a ZCD signal via another pin coupled to the off-chip power switch.
In some applications, the switching mode power supply may have several work modes. As a result, an additional pin of the control circuit for work mode selecting is needed.
In the prior art, three pins respectively for sensing the current flowing through the power switch, for detecting the voltage across the power switch to get the ZCD signal, and for selecting work mode are configured to the chip of control circuit. Obviously, too many pins increase the size and cost of the chip.